<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib prefix="his_fns" uri="/WEB-INF/tlds/his_fns.tld" %>
<script type="text/javascript">
    function page(n,s){
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchForm").submit();
        return false;
    }
</script>
<div class="content-wrap">
    <div class="wrapper" style="bottom: 50px;">
        <ul class="nav nav-tabs">
            <li class="active">
                <a href="#"   onclick="loadDiv('mainCenterDiv','${ctx}/csm/expPlanCheck/index')">采购计划查询</a>
            </li>
        </ul>
        <section class="panel panel-default">
            <div class="panel-body">
                <div class="table-responsive no-border">
                    <div class="datatable-top">
                        <div class="pull-left">
                            <form:form id="searchForm" modelAttribute="expBuyPlan"  onsubmit="return loadDivForm('mainCenterDiv','searchForm','${ctx}/csm/expPlanCheck/index');" method="post" class="form-inline">
                                <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                <div class="form-group">
                                    <label class="control-label">采购单号:</label>
                                    <form:select path="purchaseNumber" id="purchaseNumber" htmlEscape="false" class="form-control" data-parsley-required="true">
                                        <form:option value=""></form:option>
                                        <form:options items="${his_fns:getExpBuyPlanNum()}" itemLabel="purchaseNumber" itemValue="purchaseNumber" htmlEscape="false" />
                                    </form:select>
                                </div>
                                <%--<div class="form-group"><label>消耗品名称:&nbsp;&nbsp;</label><form:input path="expName" maxlength="50" class="form-control"></form:input></div>--%>
                                <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                            </form:form>
                        </div>
                    </div>
                    <table id="contentTable" class="table table-bordered table-striped mg-t datatable">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>编码</th>
                            <th>名称</th>
                            <th>规格</th>
                            <th>单位</th>
                            <th>生产厂家</th>
                            <th>供应商</th>
                            <th>采购数量</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${page.list}" var="expBuyPlan">
                        <tr>
                            <td>${expBuyPlan.purchaseOrder}</td>
                            <td> ${expBuyPlan.expCode}</td>
                            <td> ${expBuyPlan.expName}</td>
                            <td> ${expBuyPlan.packageSpec}</td>
                            <td> ${fns:getDictLabel(expBuyPlan.packageUnit, 'SPEC_UNIT', '')}</td>
                            <td> ${his_fns:getExpSupplierById(expBuyPlan.vedorName)}</td>
                            <td> ${his_fns:getExpSupplierById(expBuyPlan.supplierName)}</td>
                            <td> ${expBuyPlan.buyQuantity}</td>
                        </tr>
                        </c:forEach>

                    </table>
                    <div class="pagination">${page}</div>
                </div>
            </div>
        </section>
    </div>
</div>